﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Users
{
	/// <summary>
	/// 验证服务接口。
	/// </summary>
	public interface IVerificationService
	{
		/// <summary>
		/// 创建Email验证信息。
		/// </summary>
		/// <param name="email">电子邮箱。</param>
		/// <param name="activeCode">验证代码。</param>
		/// <param name="expired">过期时间。</param>
		/// <param name="activeType">验证类型。</param>
		/// <returns></returns>
		EmailVerification CreateEmailVerification(string email, string activeCode, DateTime expired, string activeType);

		/// <summary>
		/// 创建Email验证信息。
		/// </summary>
		/// <param name="email">电子邮箱。</param>
		/// <param name="activeType">验证类型。</param>
		/// <returns></returns>
		EmailVerification CreateEmailVerification(string email, string activeType);

		/// <summary>
		/// 获取邮箱验证信息。
		/// </summary>
		/// <param name="email">电子邮箱。</param>
		/// <param name="activeCode">验证代码。</param>
		/// <returns></returns>
		EmailVerification GetEmailVerification(string email, string activeCode);

		/// <summary>
		/// 检查邮箱验证信息是否有效。
		/// </summary>
		/// <param name="email">电子邮箱。</param>
		/// <param name="activeCode">验证代码。</param>
		/// <returns></returns>
		bool CheckEmailVerificationIsValid(string email, string activeCode);

		/// <summary>
		/// 使用邮箱验证信息。
		/// </summary>
		/// <param name="email">电子邮箱。</param>
		/// <param name="activeCode">验证代码。</param>
		/// <returns></returns>
		void UseEmailVerification(string email, string activeCode);
	}
}
